package com.cn.hnust.controller.hcontroller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.cn.hnust.pojo.Lfdcomment;
import com.cn.hnust.service.ILfdcommentService;

@Controller
@RequestMapping(value = "/hLfdcomment")
public class HLfdcommentController {

    @Autowired
    private ILfdcommentService LfdcommentService;

    @RequestMapping("/toLfdcomment")
    private String home(Model model, Lfdcomment Lfdcomment){
        List<Lfdcomment> list=LfdcommentService.selectLfdcomment();
        model.addAttribute("lfdcommentlist", list);
        return "lfdcomment";
    }
    
    @RequestMapping("/deleteLfdcomment")
    private String deleteLfdcomment(Model model, Lfdcomment Lfdcomment,Integer id){
    	LfdcommentService.deleteByPrimaryKey(id);
        List<Lfdcomment> list=LfdcommentService.selectLfdcomment();
        model.addAttribute("lfdcommentlist", list);
        return "lfdcomment";
    }

}
